﻿using System;
using System.Collections.Generic;

using DataFactory.Common;
using IDAL.Common;
using Model.Common;
namespace BLL.Common
{
    /// <summary>
    /// 业务层，通用内容，省份管理
    /// </summary>
    public class ProvinceBLL
    {
        /// <summary>
        /// 省份映射
        /// </summary>
        private IProvince dal = DataAccess.CreateProvince();

        /// <summary>
        /// 获取全部省份
        /// </summary>
        /// <returns></returns>
        public IList<ProvinceInfo> GetAllProvince() 
        {
            ProvinceCondition condition = new ProvinceCondition();
            return dal.ListProvince(new ProvinceCondition());
        }

        /// <summary>
        /// 只获取包含信息的省份
        /// </summary>
        /// <returns></returns>
        public IList<ProvinceInfo> GetInfoProvince()
        {
            ProvinceCondition condition = new ProvinceCondition();
            condition.HasInfo = "y";
            return dal.ListProvince(condition);
        }
    }
}
